#-*- coding: utf8 -*-
from tutor.script import *
from tutor.plugin.maple import *

# variáveis úteis
half = M('1/2')
t = M.t
_i, _j, _k = M('_i, _j, _k')
rr = M('`..`')
coeff = M.coeff

# parâmetros iniciais
a = M(oneof(-2, -1, -1, 1, 2, 3, 4))
b = M(oneof(-2, -1, 1, 2, 3, 4))
c = M(1)

# campo
B = fieldB = a * cos(z - c * t) * _i + \
             b * sin(z - c * t) * _j

# --- resultados --------------------------------------------------------------
print('campoB: %s' % B)

# correto 
campoE = -b * sin(z - c * t) * _i + a * cos(z - c * t) * _j
campoES = -campoE
print('campoE: %s' % campoE)

integral = -b * cos(z - c * t) * _i - a * sin(z - c * t) * _j
print('integral: %s' % integral)

divI = b * sin(z - c * t) * _i - a * sin(z - c * t) * _j
print('divI: %s' % divI)

div = -b * cos(z - c * t) * _i + a * cos(z - c * t) * _j
print('div: %s' % div)
